:orphan:

Moin Command Line Interface
===========================

Moin2 has two command line interfaces. The first interface, powered
by quickinstall.py and started by the **./m** command (**m** on windows),
implements the most common functions used by developers.
This CLI is only available when moin is installed using git to
clone a repository from https://github.com/moinwiki/moin or alternative.

The second interface, **moin**, is implemented by several Python scripts
located in the /cli/ directory. This interface targets wiki migration,
account creation and maintenance, and wiki maintenance.

There is some overlap between the two interfaces. Several of the commands
within the first interface are implemented by wrapping one or more of the
cli interface commands to accomplish a task.

./m Interface
-------------

The virtual environment must be activated before using the ./m
interface. Executing **./m** (**m** on windows) without any options produces
the menu::

    usage: "{0} <target>" where <target> is:

    quickinstall    update virtual environment with required packages
    extras          install packages required for docs and moin development
    docs            create moin html documentation (requires extras)
    interwiki       refresh intermap.txt
    log <target>    view detailed log generated by <target>, omit to see list

    new-wiki        create empty wiki
    sample          create wiki and load sample data
    restore *       create wiki and restore wiki/backup.moin *option, specify file
    import19 <dir> <args> import a moin1.9 wiki/data instance from <dir> with <args>
                    where <args> = "--markup_out moinwiki" or markdown,rst,html,...

    run *           run built-in wiki server *options (--port 8081)
    backup *        roll 3 prior backups and create new backup *option, specify file
    dump-html *     create a static HTML image of wiki *options, see docs
    index           delete and rebuild indexes

    css             run lessc to update basic theme CSS files
    tests *         run tests, log output (-v -k my_test)
    coding-std      correct scripts that taint the repository with trailing spaces..

    del-all         same as running the 4 del-* commands below
    del-orig        delete all files matching *.orig
    del-pyc         delete all files matching *.pyc
    del-rej         delete all files matching *.rej
    del-wiki        create a backup, then delete all wiki data


moin Interface
--------------

:program:`moin` is the command line interface to miscellaneous MoinMoin Wiki related
tools.

If you invoke :program:`moin` without any arguments, it will show a short quick help,

`moin --help` will show a more complete overview:

::

    Usage: moin [OPTIONS] COMMAND [ARGS]...

      Moin extensions to the Flask CLI

    Options:
      --version  Show the flask version
      --help     Show this message and exit.

    Commands:
      account-create          Create a user account
      account-disable         Disable user accounts
      account-password        Set user passwords
      create-instance         Create wikiconfig and wiki instance directories...
      dump-help               Dump a namespace of user help items to .data...
      dump-html               Create a static HTML image of this wiki
      help                    Quick help
      import19                Import content and user data from a moin 1.9 wiki
      index-build             Build the indexes
      index-create            Create empty indexes
      index-destroy           Destroy the indexes
      index-dump              Dump the indexes in readable form to stdout
      index-move              Move the indexes from the temporary to the...
      index-optimize          Optimize the indexes
      index-update            Update the indexes
      item-get                Get an item revision from the wiki
      item-put                Put an item revision into the wiki
      load                    Deserialize a file into the backend; with...
      load-help               Load a directory of help .data and .meta file...
      load-sample             Load wiki sample items
      maint-reduce-revisions  Remove all revisions but the last one from all...
      maint-set-meta          Set meta data of a new revision
      maint-validate-metadata Find and optionally fix issues with item metadata
      routes                  Show the routes for the app.
      run                     Run a development server.
      save                    Serialize the backend into a file
      shell                   Run a shell in the app context.


See also
--------

:manpage:`moinmoin(1)`
